package t20211226;

import java.util.Arrays;

/**
 * @Author: DengJia
 * @Date: 2021/12/26 15:15
 * @Description:
 */

public class MainTest {
    public static void main(String[] args) {
        try {
            throw new NullPointerException();
        } catch (NullPointerException e) {
            e.printStackTrace();
            System.out.println(e.getMessage());
            System.out.println(e.getLocalizedMessage());
            System.out.println(e.getClass());
            Class<? extends NullPointerException> aClass = e.getClass();
            System.out.println(aClass.getName());
            System.out.println(aClass.getSimpleName());
            StackTraceElement[] elements = e.getStackTrace();
            System.out.println(Arrays.toString(elements));
        }
    }

    static void m() throws Exception {

    }
}
